package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("agencyCertificationController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 机构端提交认证相关接口")
public class AgencyCertificationController {

    @Resource
    private IAgencyCertificationService agencyCertificationService;
    @PostMapping
    @ApiOperation("机构提交认证申请")
    public void applyAgencyCerti(@RequestBody AgencyCertificationAuditAddReqDTO agencyAddReqDTO){
        agencyCertificationService.apply(agencyAddReqDTO);
    }


    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public RejectReasonResDTO getRejectReason(){
        RejectReasonResDTO reasonResDTO=
                agencyCertificationService.getRejectReason();
        return reasonResDTO;
    }

}
